package com.dream.service.impl;

import com.dream.dao.ClazzDao;
import com.dream.dao.impl.ClazzDaoImpl;
import com.dream.pojo.Clazz;
import com.dream.service.ClazzService;

import java.util.List;

public class ClazzServiceImpl implements ClazzService {
    ClazzDao clazzDao = new ClazzDaoImpl();
    @Override
    public List<Clazz> findClazzByMajorId(String majorId) {
        return clazzDao.findClazzByMajorId(majorId);
    }

    @Override
    public long totalCount(String clazzName) {
        return clazzDao.totalCount(clazzName);
    }

    @Override
    public List<Clazz> list(String clazzName, long pageIndex, long pageSize) {
        return clazzDao.list(clazzName,pageIndex,pageSize);
    }

    @Override
    public int add(Clazz clazz) {
        return clazzDao.add(clazz);
    }

    @Override
    public Clazz findById(String clazzId) {
        return clazzDao.findById(clazzId);
    }

    @Override
    public int update(Clazz clazz) {
        return clazzDao.update(clazz);
    }

    @Override
    public int deleteById(String clazzId) {
        return clazzDao.deleteById(clazzId);
    }
}
